﻿using Microsoft.Phone.Controls;
using System;

namespace USpell.Controls
{
    /// <summary>
    ///  没有隙缝的Panorama 全景图，适合图片翻页
    /// </summary>
    public class PanoramaNoGap : Panorama
    {
        //Panorama 默认展示下一屏50像素预览
        private const double _gapWidth = 50;

        protected override System.Windows.Size MeasureOverride(System.Windows.Size availableSize)
        {
            //在控件根据Size重画时，添加宽度，以弥补下一屏的预览隙缝效果不显示
            availableSize = new System.Windows.Size(availableSize.Width + _gapWidth, availableSize.Height);
            return base.MeasureOverride(availableSize);
        }
    }
}
